package com.evil.application.api;

import com.evil.application.config.FeignErrorDecoder;
import com.evil.application.pojo.dto.order.message.AddOrderMessageReqDTO;
import com.evil.application.pojo.dto.order.message.OrderMessageReqDTO;
import com.evil.application.pojo.dto.order.message.OrderMessageRespDTO;
import com.evil.common.core.constant.ServiceNameConstant;
import com.evil.common.core.entity.QueryModel;
import com.github.pagehelper.PageInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 应用订单留言接口
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@FeignClient(name = ServiceNameConstant.APPLICATION_SERVICE, configuration = {FeignErrorDecoder.class})
public interface RemoteApplicationOrderMessageService {

    /**
     * 订单留言
     *
     * @param queryModel queryModel
     * @return List
     */
    @PostMapping("/remote/application/order/message/page")
    PageInfo<OrderMessageRespDTO> orderMessage(@Validated @RequestBody QueryModel<OrderMessageReqDTO> queryModel);

    /**
     * 新增订单留言
     *
     * @param addOrderMessageReqDTO addOrderMessageReqDTO
     */
    @PostMapping("/remote/application/order/message/add")
    void addOrderMessage(@Validated @RequestBody AddOrderMessageReqDTO addOrderMessageReqDTO);
}
